<?php $view->extend('crud/header', 'content', array('entity' => $entity))?>
<h3><a href="<?php echo $view->url->linkTo('crud_create', array('name' => $entity))?>">New</a></h3>
<table>
	<tr>
	<?php foreach($fields as $fieldName => $field): ?>
		<th><?php echo $worker->translateField($fieldName)?></th>
	<?php endforeach; ?>
	</tr>
	<?php foreach($entries as $entry): ?>
	<tr>
		<?php foreach($fields as $fieldName => $field): ?>
			<?php if (!is_object($entry[$fieldName])):?>
			<td><?php echo substr($entry[$fieldName], 0, 75)?></td>
			<?php else: ?>
					<td><?php echo $entry[$fieldName]->format('Y-m-d H:i:s')?></td>
			<?php endif; ?>
		<?php endforeach; ?>
	
		<td><a href="<?php echo $view->url->linkTo('crud_read', array('name' => $entity, 'id' => $worker->getIdentifier($entry)))?>">Edit</a></td>
	
		<td><a href="<?php echo $view->url->linkTo('crud_delete', array('name' => $entity, 'id' => $worker->getIdentifier($entry)))?>">Delete</a></td>
	</tr>
	<?php endforeach; ?>
	
</table>
